import request from '@/utils/request'

// 分页查询直播场次
export function getAllRoom (data) {
  return request({
    url: '/sys/livesRoom/getAllRoom',
    method: 'post',
    data: data
  })
}

//平台结算
export function platformSettlement (id) {
  return request({
    url: `/sys/livesRoom/platformSettlement/${id}`,
    method: 'post',
  })
}
// 直播后
export function livesRoomUpload (data) {
  return request({
    url: `/sys/livesRoom/update`,
    method: 'post',
    data: data
  })
}

//后台强制关闭直播间
export function closeLive (id) {
  return request({
    url: `/sys/livesRoom/closeLive/${id}`,
    method: 'post',
  })
}

// 水军用户列表
export function userList (data) {
  return request({
    url: `/sys/app/user/page`,
    method: 'post',
    data: data,
  })
}
// 直播中
export function sendMessage (data) {
  return request({
    url: `/sys/livesRoom/sendMessage`,
    method: 'post',
    data: data,
  })
}
//开启自动直播

export function enableAutomaticLive (sessionId, data) {
  return request({
    url: `/sys/livesRoom/enableAutomaticLive/${sessionId}`,
    method: 'post',
    data: data,
  })
}
// 未达标平台结算
export function nonStandardSettlement (sessionId, data) {
  return request({
    url: `/sys/livesRoom/nonStandardSettlement/${sessionId}`,
    method: 'post',
    data: data,
  })
}

// 解析地址
export function resolutionAddress (address) {
  return request({
    url: `/sys/livesRoom/resolutionAddress${address}`,
    method: 'get'
  })
}